package com.wzh.controll;

import com.wzh.pojo.Po.Card;
import com.wzh.pojo.Po.CardAndUser;
import com.wzh.pojo.Po.NameList;
import com.wzh.pojo.Req.DataReq;
import com.wzh.pojo.Resp.DataResp;
import com.wzh.pojo.result;
import com.wzh.service.CardService;
import com.wzh.service.Userser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/Card")
public class CardController {

	@Autowired
	private CardService cardService;
	@PostMapping("/delCard")
	@ResponseBody
	public DataResp delCard(@RequestBody CardAndUser cardAndUser){
		DataResp<Object> resp= cardService.delCard(cardAndUser);
		return resp;
	};

	@PostMapping("/showCard")
	@ResponseBody
	public DataResp show(@RequestBody DataReq req){
		DataResp<Object> resp= cardService.show(req);
		return resp;
	};

	@GetMapping("/addCards")
	@ResponseBody
	public DataResp AddRole(@RequestParam("Type") Integer Type){
		DataResp<Object> resp= cardService.addCards(Type);
		return resp;
	}

}
